USE [GD1C2012]
GO

/****** Object:  UserDefinedFunction [SUPERACIDOS].[PermisoHabilitado]    Script Date: 06/03/2012 19:02:40 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date, ,>
-- Description:	<Description, ,>
-- =============================================
create FUNCTION [SUPERACIDOS].[GetRolId]
(
	-- Add the parameters for the function here
)
RETURNS int
AS
BEGIN
	DECLARE @valor INT
	-- Declare the return variable here
	SET @valor = (SELECT ((select Max(rol_Id) from Superacidos.rol) + 1))
	
	RETURN @valor
	
	
END

GO


